// $ANTLR 3.0.1 C:\\Documents and Settings\\Derek\\workspace\\CS214\\CS 214 Interpreters\\src\\edu\\calvin\\djs32\\cs214\\interpreters\\frontend\\Hobbes2008.g 2008-02-18 23:58:39

package edu.calvin.djs32.cs214.interpreters.frontend;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;


import org.antlr.runtime.tree.*;

@SuppressWarnings("all")
public class Hobbes2008Parser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "INTEGER", "STRING", "NUMBER", "HEXDIGIT", "SIGN", "WHITESPACE", "COMMENTS"
    };
    public static final int INTEGER=4;
    public static final int HEXDIGIT=7;
    public static final int EOF=-1;
    public static final int NUMBER=6;
    public static final int STRING=5;
    public static final int SIGN=8;
    public static final int COMMENTS=10;
    public static final int WHITESPACE=9;

        public Hobbes2008Parser(TokenStream input) {
            super(input);
        }
        
    protected TreeAdaptor adaptor = new CommonTreeAdaptor();

    public void setTreeAdaptor(TreeAdaptor adaptor) {
        this.adaptor = adaptor;
    }
    public TreeAdaptor getTreeAdaptor() {
        return adaptor;
    }

    public String[] getTokenNames() { return tokenNames; }
    public String getGrammarFileName() { return "C:\\Documents and Settings\\Derek\\workspace\\CS214\\CS 214 Interpreters\\src\\edu\\calvin\\djs32\\cs214\\interpreters\\frontend\\Hobbes2008.g"; }

     
      protected void mismatch(IntStream input, int ttype, BitSet follow) 
        throws RecognitionException { 
        throw new MismatchedTokenException(ttype, input); 
      } 
      public void recoverFromMismatchedSet(IntStream input, RecognitionException e, BitSet follow) 
        throws RecognitionException { 
        throw e; 
      } 


    public static class program_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start program
    // C:\\Documents and Settings\\Derek\\workspace\\CS214\\CS 214 Interpreters\\src\\edu\\calvin\\djs32\\cs214\\interpreters\\frontend\\Hobbes2008.g:45:1: program : ( ( INTEGER ) | ( STRING ) ) EOF ;
    public final program_return program() throws RecognitionException {
        program_return retval = new program_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token INTEGER1=null;
        Token STRING2=null;
        Token EOF3=null;

        Object INTEGER1_tree=null;
        Object STRING2_tree=null;
        Object EOF3_tree=null;

        try {
            // C:\\Documents and Settings\\Derek\\workspace\\CS214\\CS 214 Interpreters\\src\\edu\\calvin\\djs32\\cs214\\interpreters\\frontend\\Hobbes2008.g:45:8: ( ( ( INTEGER ) | ( STRING ) ) EOF )
            // C:\\Documents and Settings\\Derek\\workspace\\CS214\\CS 214 Interpreters\\src\\edu\\calvin\\djs32\\cs214\\interpreters\\frontend\\Hobbes2008.g:45:10: ( ( INTEGER ) | ( STRING ) ) EOF
            {
            root_0 = (Object)adaptor.nil();

            // C:\\Documents and Settings\\Derek\\workspace\\CS214\\CS 214 Interpreters\\src\\edu\\calvin\\djs32\\cs214\\interpreters\\frontend\\Hobbes2008.g:45:10: ( ( INTEGER ) | ( STRING ) )
            int alt1=2;
            int LA1_0 = input.LA(1);

            if ( (LA1_0==INTEGER) ) {
                alt1=1;
            }
            else if ( (LA1_0==STRING) ) {
                alt1=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("45:10: ( ( INTEGER ) | ( STRING ) )", 1, 0, input);

                throw nvae;
            }
            switch (alt1) {
                case 1 :
                    // C:\\Documents and Settings\\Derek\\workspace\\CS214\\CS 214 Interpreters\\src\\edu\\calvin\\djs32\\cs214\\interpreters\\frontend\\Hobbes2008.g:45:11: ( INTEGER )
                    {
                    // C:\\Documents and Settings\\Derek\\workspace\\CS214\\CS 214 Interpreters\\src\\edu\\calvin\\djs32\\cs214\\interpreters\\frontend\\Hobbes2008.g:45:11: ( INTEGER )
                    // C:\\Documents and Settings\\Derek\\workspace\\CS214\\CS 214 Interpreters\\src\\edu\\calvin\\djs32\\cs214\\interpreters\\frontend\\Hobbes2008.g:45:12: INTEGER
                    {
                    INTEGER1=(Token)input.LT(1);
                    match(input,INTEGER,FOLLOW_INTEGER_in_program65); 
                    INTEGER1_tree = (Object)adaptor.create(INTEGER1);
                    adaptor.addChild(root_0, INTEGER1_tree);


                    }


                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\Derek\\workspace\\CS214\\CS 214 Interpreters\\src\\edu\\calvin\\djs32\\cs214\\interpreters\\frontend\\Hobbes2008.g:45:21: ( STRING )
                    {
                    // C:\\Documents and Settings\\Derek\\workspace\\CS214\\CS 214 Interpreters\\src\\edu\\calvin\\djs32\\cs214\\interpreters\\frontend\\Hobbes2008.g:45:21: ( STRING )
                    // C:\\Documents and Settings\\Derek\\workspace\\CS214\\CS 214 Interpreters\\src\\edu\\calvin\\djs32\\cs214\\interpreters\\frontend\\Hobbes2008.g:45:22: STRING
                    {
                    STRING2=(Token)input.LT(1);
                    match(input,STRING,FOLLOW_STRING_in_program69); 
                    STRING2_tree = (Object)adaptor.create(STRING2);
                    adaptor.addChild(root_0, STRING2_tree);


                    }


                    }
                    break;

            }

            EOF3=(Token)input.LT(1);
            match(input,EOF,FOLLOW_EOF_in_program73); 

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end program


 

    public static final BitSet FOLLOW_INTEGER_in_program65 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_STRING_in_program69 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_program73 = new BitSet(new long[]{0x0000000000000002L});

}